﻿using System;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Powersource_UnitTests.StatisticsTest;
using PowersourceUIToolkit;
using UCL.Powersource;
using UCL.Powersource.Mock;
using UCL.Powersource.TFS;

namespace Powersource_UnitTests
{
    [TestClass]
    public class AnalysisBridgeTest
    {
        private DummyPowersourceBootStrapper bs = null;

        [TestInitialize]
        public void TestStart()
        {
            bs = new DummyPowersourceBootStrapper();

            bs.TfsTeamProjectCollectionFactory = new TfsTeamProjectCollectionFactoryAdapter();

            bs.Initialize();
        }

        [TestCleanup]
        public void TestEnd()
        {
            bs.Dispose();
            bs = null;
        }

        [TestMethod]
        public void TestAnalysisBridgeFirst()
        {
            var mockCollConfig = new MockTfsTeamProjectCollConfig();
            //var str = mockCollConfig.First().ProjectAnalysisBridge.RetrieveDisassemblyFiles(mockCollConfig._ProjectCollectionTimeFrames[0]);
            //string str = mockCollConfig.First().ProjectAnalysisBridge.RetrieveCodeIndexConnectionString(mockCollConfig._ProjectCollectionTimeFrames[0]);
            //string str2 = mockCollConfig.First().ProjectAnalysisBridge.RetrieveCodeIndexConnectionString(mockCollConfig._ProjectCollectionTimeFrames[0], true);

            //var pr = mockCollConfig.First();
            //var time = mockCollConfig._ProjectCollectionTimeFrames[0];
            //var files = pr.ProjectAnalysisBridge.RetrieveDisassemblyFiles(time);
            
            //var codeIndexString = pr.ProjectAnalysisBridge.RetrieveCodeIndexConnectionString(time);
            //var codeIndex = ((AnalysisBridge)pr.ProjectAnalysisBridge).RetrieveCodeIndex(time);
        }
    }
}
